package com.smart.domain;

import java.util.Comparator;
/*定义学生实体类  用于封装学生信息*/
public class StudentUser /*implements Comparable<StudentUser>*/{
    private String name;
    private String id;
    private String sclass;
    private String sex;
    private String password;
    private String grade;


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getGrade() {
        return grade;
    }

    public void setGrade(String grade) {
        this.grade = grade;
    }

    public String getSclass() {
        return sclass;
    }

    public void setSclass(String sclass) {
        this.sclass = sclass;
    }


    /*  @Override
    public int compareTo(StudentUser o1, StudentUser o2) {//将大于零和小于零颠倒可以实现降序排序
        if(o1.grade>o2.grade)
            return -1;
        if(o1.grade<o2.grade)
            return 1;
        return 0;
    }*/

   /* @Override
    public int compareTo(StudentUser o) {
        if(this.grade<o.grade)
            return 1;
        if(this.grade>o.grade)
            return -1;
        return 0;
    }

    @Override
    public String toString() {
        return "StudentUser{" +
                "name='" + name + '\'' +
                ", id='" + id + '\'' +
                ", sclass='" + sclass + '\'' +
                ", sex='" + sex + '\'' +
                ", password='" + password + '\'' +
                ", grade=" + grade +
                '}';
    }*/
}
